﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using bi4homev3.Entidades;
using bi4homev3.Logica;

namespace bi4homev3.Paginas
{
    public partial class PagoSerPersonal : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["validar"].Equals("false"))
            {
                Response.Redirect("NuevoPerfil.aspx");
            }

        }

        protected void sendperfil_Click(object sender, EventArgs e)
        {
            PagoServicio pagoser = new PagoServicio();
            pagoser.Fecha = this.Fecha.Text;
            pagoser.NumeroFactura = Convert.ToInt32(this.Factura.Text);
            pagoser.Servicio = Convert.ToInt32(this.DropDownList1.Text);
            pagoser.Monto = Convert.ToDouble(this.Monto.Text);
            pagoser.Usuario = (string)(Session["usuario"]);
            AccionesServicios crea = new AccionesServicios(pagoser);
            crea.insertar();
            Session["mensaje"] = "insertopago";
            Response.Redirect("Servicios.aspx");           
        }
    }
}
